namespace SPI.AgentServer.Services.Export;

/// <summary>
/// 图表服务接口 - 用于生成 ECharts 配置
/// </summary>
public interface IChartService
{
    /// <summary>
    /// 根据查询数据生成图表配置
    /// </summary>
    /// <param name="data">查询结果数据</param>
    /// <returns>图表结果，包含类型、配置和描述</returns>
    Task<ChartResult> GenerateChartAsync(object data);
}

/// <summary>
/// 图表生成结果
/// </summary>
public class ChartResult
{
    /// <summary>
    /// 图表类型（如：bar, line, pie, scatter）
    /// </summary>
    public string ChartType { get; set; } = "bar";
    
    /// <summary>
    /// ECharts 配置对象
    /// </summary>
    public object? Config { get; set; }
    
    /// <summary>
    /// 图表描述
    /// </summary>
    public string Summary { get; set; } = string.Empty;
}

